<extend name="Public:innerbase" />
<block name="css">
<link rel="stylesheet" href="{:STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{:STATICS}/kindeditor/plugins/code/prettify.css" />
</block>
<block name="js">
<include file="Public:upload" />
<include file="Public:editor" />
<script src="{:RES}/js/date/WdatePicker.js"></script>
<script src="{:STATICS}/js/holder.min.js"></script>
</block>
<block name="content">
<div class="container-fluid">
	<div class="page-header wm-page-header">
		<h4 class="left">自定义表单</h4>
		<span>表单地址</span>
		<code><php>echo rtrim(C('wap_domain'),'/').U('Wap/Selfform/index',['token'=>$token,'id'=>$set['id']])</php></code><br/>
		<a href="{:U('Selfform/index')}" class="btn btn-sm btn-default">
			<span class="glyphicon glyphicon-chevron-left"></span>
			返回
		</a>
	</div>
	<form class="form-horizontal" method="post">
		<input type="hidden" name="id" value="{$set.id}" />
		<div class="form-group">
			<label class="col-sm-2">名称</label>
			<div class="col-md-4">
				<input type="text" id="name" name="name" value="{$set.name}" class="form-control" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2">关键词</label>
			<div class="col-md-4">
				<input type="text" name="keyword" id="keyword" value="{$set.keyword}" class="form-control" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2">简介</label>
			<div class="col-md-4">
				<textarea name="intro" class="form-control" style="height:80px;">{$set.intro}</textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2">截止日期</label>
			<div class="col-md-4">
				<input type="text" class="form-control" id="enddate" value="{$set.endtime|date="Y-m-d",###}" onClick="WdatePicker()" name="enddate" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2">表单图片</label>
			<div class="col-md-6">
				<input type="hidden" name="logourl" value="{$set.logourl}" id="logourl" class="form-control" />
				<img id="logourlHolder" style="width:216px;height:120px;" class="img-rounded" <?php if($set["logourl"] == '')echo 'data-src="$holder.js/216x120/gray/text:720*400"';?> src="{$set.logourl}"/>
				<div class="btn-group" style="vertical-align:bottom;">
					<span class="btn btn-xs btn-primary" onclick="selectAsset('logourl',720,400)">
						<span class="glyphicon glyphicon-cloud-upload"></span>选择
					</span>
					<span class="btn btn-primary btn-xs" onclick="previewImg('logourl')">
						<span class="glyphicon glyphicon-picture"></span>预览
					</span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2">提交成功提示</label>
			<div class="col-md-4">
				<input type="text" id="successtip" name="successtip" value="{$set.successtip}" class="form-control" /> 
			</div>
			<span class="col-sm-2">默认：提交成功</span>
		</div>
		<div class="form-group">
			<label class="col-sm-2">提交失败提示</label>
			<div class="col-md-4">
				<input type="text" id="failtip" name="failtip" value="{$set.failtip}" class="form-control" />
			</div>
			<span class="col-sm-2">默认：提交失败</span>
		</div>
		<div class="form-group">
			<label class="col-sm-2">图文详细内容</label>
			<div class="col-md-6">
				<textarea name="content" id="content" class="form-control" style="height:240px">{$set.content}</textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-4 col-sm-offset-2">
				<input type="submit" class="btn btn-primary" value="保存" />
			</div>
		</div>
	</form>
</div>
</block>